package com.xiaoyy.core.common.enums;
/**
 * 功能类型
 *
 * */
public enum FuncTypeEnum {
    query("query", "查询"),
    edit("edit", "编辑"),
    insert("insert", "新增"),
    update("update", "更新"),
    delete("delete", "删除"),
    other("other", "其他");
    private String type;
    private String text;

    FuncTypeEnum(String type, String text) {
        this.type = type;
        this.text = text;
    }

    public String getType() {
        return this.type;
    }

    public String getText() {
        return this.text;
    }
    public static FuncTypeEnum getByType(String type) {
        for (FuncTypeEnum typeEnum : values()) {
            if (typeEnum.getType() .equals(type) ) {
                return typeEnum;
            }
        }
        return null;
    }
}
